//app.js
App({
  onLaunch: function () {
    
    if (!wx.cloud) {
      console.error('请使用 2.2.3 或以上的基础库以使用云能力')
    } else {
      wx.cloud.init({
        traceUser: true,
      })
    }

    // get sign
    wx.cloud.callFunction({
      name:'sign',
      success:(res)=>{
        console.log(res);
        this.globalData.sign = res.result.sign
        this.globalData.openid = res.result.openid
        console.log('this.globalData.openid',this.globalData.openid)
      },
    });

    this.globalData = {
      sign:null,
      openid:null
    }
  }
})
